Skip to main content

Copy File

AutomatR.OneDriveApp.Activities.CopyFile

The "Copy File" activity in AutomatR is part of the OneDrive activities package, enabling automation processes to copy files from one location to another within Microsoft OneDrive. This activity streamlines file management tasks in OneDrive, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
Destination PathSpecifies the destination path where the file should be copied to in OneDrive. It represents the location within the OneDrive account. String variables containing the destination path.
File NameSpecifies the name of the file to be copied. This can include the file extension. String variables containing the file name.
Source PathSpecifies the source path of the file to be copied. It represents the location within the OneDrive account from which the file will be copied. String variables containing the source path.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Copy File" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1.
Output
ResultOutputs the result of the "Copy File" operation, indicating whether the file copy was successful or any encountered errors. Variables of relevant types (e.g., Boolean variables) to store the operation result.

How to use:

  1. Drag and drop the "Copy File" activity onto the workflow.
  2. Configure the properties by specifying the destination path, file name, and source path within the OneDrive account.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to copy the specified file within OneDrive.

Example: Consider an example where the "Copy File" activity is used to copy a file named "document.txt" from one folder to another within OneDrive:

Copy File:
Display Name: "Copy Document File"
Source Path: "/Folder1/document.txt"
Destination Path: "/Folder2/"
Result: isCopySuccessful

In this example, the activity copies the "document.txt" file from the "Folder1" directory to the "Folder2" directory within OneDrive. The result of the operation (success or failure) is stored in the Boolean variable "isCopySuccessful" for further handling in the workflow.